-
Couldn't load subscription status.
- Fork 3
fix: add count to wait #299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
/run pipeline |
main.tf
Outdated
|
|
||
| # workaround for https://github.com/IBM-Cloud/terraform-provider-ibm/issues/4478 | ||
| resource "time_sleep" "wait_for_authorization_policy" { | ||
| count = var.kms_encryption_enabled == false || var.skip_iam_authorization_policy ? 0 : 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this now has a count, does the depends_on on line 56 need to be updated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of duplicating line 38 and 48, suggest to use a local (incase the logic is ever updated, it would only need to be changed in 1 place)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this now has a count, does the depends_on on line 56 need to be updated?
No, when doing depends on we don't do any indexing or anything like that so it passes as is and is still necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MatthewLemmond Actually the issue you created was to make the change in the DA ->
terraform-ibm-icd-elasticsearch/solutions/standard/main.tf
Lines 59 to 62 in e220b34
| resource "time_sleep" "wait_for_authorization_policy" { | |
| depends_on = [ibm_iam_authorization_policy.kms_policy] | |
| create_duration = "30s" | |
| } |
The change you made to the module is valid too I guess
|
It looks like changes are required in both. It seems the DA only creates the policy IF it is cross account. The main module creates the policy if it is the same account. |
|
/run pipeline |
|
The upgrade test fails due to the wait not being provisioned in the latest version: https://github.com/terraform-ibm-modules/terraform-ibm-icd-elasticsearch/actions/runs/11056038146/job/30716846899#step:7:2206 This is expected because we are now skipping these when an auth policy is not created and the upgrade test uses the standard solution, here is the output doing the upgrade test manually and allowing it to destroy the wait blocks The one authorization policy that is still present has its wait still, but the two waits which were not needed have been destroyed. Going to skip the upgrade test for this PR as this all seems to be following the expected behavior of these changes. |
SKIP UPGRADE TEST due to the wait blocks that are not needed being destroyed the upgrade test is failing, this is expected behavior for this update
|
/run pipeline |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
🎉 This PR is included in version 1.20.2 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Description
If the auth policy creation is skipped, the wait will now also be skipped.
resolves #283
Release required?
x.x.X)x.X.x)X.x.x)Release notes content
Run the pipeline
If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.
Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:
Checklist for reviewers
For mergers